#ifndef __KEY_H__
#define __KEY_H__
#include "main.h"
#define S_123_PORT		GPIOA
#define S_123_1_PIN		GPIO_Pin_1
#define S_123_2_PIN		GPIO_Pin_2
#define S_123_3_PIN		GPIO_Pin_3
#define S_123_RCC		RCC_AHBPeriph_GPIOA

#define S_4567_PORT		GPIOC
#define S_4567_4_PIN	GPIO_Pin_3
#define S_4567_5_PIN	GPIO_Pin_4
#define S_4567_6_PIN	GPIO_Pin_5
#define S_4567_7_PIN	GPIO_Pin_6
#define S_4567_RCC		RCC_AHBPeriph_GPIOC

typedef union
{
struct k{
    uint8_t s1: 1;
    uint8_t s2: 1;    
    uint8_t s3: 1;
    uint8_t s4: 1;
	uint8_t s5: 1;
	uint8_t s6: 1;
	uint8_t s7: 1;
	uint8_t reserve: 1;
}K_s_bit;
	uint8_t Key_all;
}Key_truth_table;



uint8_t Get_Key_value(void);
void bsp_KeyScan20ms(void);
void S_1234567_GPIO_init(void);

#endif